package com.wondedDream.repository;

import com.wondedDream.model.MockExam;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface MockExamRepository extends JpaRepository<MockExam, Integer> { // 新增的自定义查询方法
    @Query("SELECT e FROM MockExam e WHERE e.category.id = :categoryId")
    List<MockExam> findByCategoryId(Integer categoryId);

}